package classx;

import java.util.Random;

public class ActiveUse {

    public static void main(String[] args) throws Exception{

        Class.forName("classx.User");
    }
}

class User {
    static {
        System.out.println("User类的初始化");
    }
    public static  int num = 1;//会初始化
    public static final  int num1 = 1;//会初始化
    public static final  int num2 = new Random().nextInt(100);//会初始化
}